package juego.escenario;

import javax.swing.JLabel;
import javax.swing.JPanel;

import juego.graficos.*;

public class ActualizadorUp extends Thread {
	
	protected JLabel labelMario;
	
	public ActualizadorUp(JLabel labelMario)
	{
		this.labelMario = labelMario;
	}
	
	public void run()
	{
		
		for( int i = 0; i < 10; i++ )
		{
			try
			{
				this.labelMario.setLocation(this.labelMario.getLocation().x,
						this.labelMario.getLocation().y - 15);
				Thread.sleep(50);
			} catch (Exception e)
			{
				e.getMessage();
			}
		}
		
		for( int i = 0; i < 10; i++ )
		{
			try
			{
				this.labelMario.setLocation(this.labelMario.getLocation().x,
						this.labelMario.getLocation().y + 15);
				Thread.sleep(25);
			} catch (Exception e)
			{
				e.getMessage();
			}
		}
	}
}
